﻿using System;
using Microsoft.EntityFrameworkCore.Migrations;

namespace Fur.Htx.Database.Migrations.Migrations
{
    public partial class Init : Migration
    {
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.CreateTable(
                name: "Sys_User",
                columns: table => new
                {
                    Id = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    Name = table.Column<string>(type: "nvarchar(max)", nullable: true, comment: "姓名"),
                    Code = table.Column<string>(type: "nvarchar(max)", nullable: true, comment: "用户编码"),
                    Age = table.Column<int>(type: "int", nullable: false, comment: "年龄"),
                    CreatedTime = table.Column<DateTimeOffset>(type: "datetimeoffset", nullable: false),
                    UpdatedTime = table.Column<DateTimeOffset>(type: "datetimeoffset", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_Sys_User", x => x.Id);
                });

            migrationBuilder.InsertData(
                table: "Sys_User",
                columns: new[] { "Id", "Age", "Code", "CreatedTime", "Name", "UpdatedTime" },
                values: new object[] { 1, 33, "sunxsh", new DateTimeOffset(new DateTime(2021, 9, 9, 10, 46, 23, 619, DateTimeKind.Unspecified).AddTicks(1153), new TimeSpan(0, 8, 0, 0, 0)), "孙小双", null });

            migrationBuilder.InsertData(
                table: "Sys_User",
                columns: new[] { "Id", "Age", "Code", "CreatedTime", "Name", "UpdatedTime" },
                values: new object[] { 2, 28, "liyr", new DateTimeOffset(new DateTime(2021, 9, 9, 10, 46, 23, 625, DateTimeKind.Unspecified).AddTicks(239), new TimeSpan(0, 8, 0, 0, 0)), "李怡然", null });

            migrationBuilder.InsertData(
                table: "Sys_User",
                columns: new[] { "Id", "Age", "Code", "CreatedTime", "Name", "UpdatedTime" },
                values: new object[] { 3, 18, "sunyj", new DateTimeOffset(new DateTime(2021, 9, 9, 10, 46, 23, 625, DateTimeKind.Unspecified).AddTicks(291), new TimeSpan(0, 8, 0, 0, 0)), "孙远杰", null });
        }

        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropTable(
                name: "Sys_User");
        }
    }
}
